/*
 * Copyright (c) 2023 Huawei Technologies Co., Ltd.
 * openUBMC is licensed under Mulan PSL v2.
 * You can use this software according to the terms and conditions of the Mulan PSL v2.
 * You may obtain a copy of Mulan PSL v2 at:
 *         http://license.coscl.org.cn/MulanPSL2
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PSL v2 for more details.
 */

#ifndef GEN_OPTICAL_MODULE_STATUS_INTERFACE_H
#define GEN_OPTICAL_MODULE_STATUS_INTERFACE_H

#include <device_tree/base.h>

namespace dev::gen {

class MC_API OpticalModule_Status : public mc::engine::interface<OpticalModule_Status> {
public:
    MC_INTERFACE("bmc.dev.OpticalModule.Status")

    property<uint8_t>             PowerState;  ///< 功率异常标志位：0：正常；1：异常
    property<uint32_t>            FaultState;  ///< 故障状态：0：正常；非0：异常
    property<bool>                TypeMatch;   ///< 网卡支持类型与光模块类型是否匹配：true：匹配；false：不匹配
    property<bool>                SpeedMatch;  ///< 网卡支持速率与光模块速率是否匹配：true：匹配；false：不匹配
    property<bool>                RXLossState;  ///< 光模块 Rx 端是否有信号
    property<bool>                TXLossState;  ///< 光模块 Tx 端是否有信号
    property<bool>                TXFaultState; ///< 光模块 Tx 端是否故障
    property<std::vector<double>> RXSNR;       ///< 端口接收信噪比
    property<std::vector<double>> HostSNR;     ///< 主机侧信噪比
    property<std::vector<double>> MediaSNR;    ///< 介质侧信噪比
};
} // namespace dev::gen

#endif // GEN_OPTICAL_MODULE_STATUS_INTERFACE_H
